const mongoose = require("mongoose");
const path = require("path");
const ra = require("require-all");

module.exports = () => {
  mongoose.connect("mongodb://127.0.0.1:27017/node-vue-moba", {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useFindAndModify: false,
  });

  ra(path.resolve(__dirname, "../models"));
};
